using System;

namespace OrbitOne.GoogleCustomSearch.QueryParameters
{
    /// <summary>
    /// Optional. The filter parameter activates or deactivates the automatic filtering of Google search results. 
    /// See the Automatic Filtering section of this document for more information about Google's search results filters.
    /// </summary>
    public class Filter : QueryParameter
    {
        private string value="1";

        public override string Name
        {
            get { return "filter"; }
        }

        public override string Value
        {
            get
            {
                 return value;
            }
            set
            {
                if (value != "1" && value != "0")
                {
                    throw new ArgumentException("filter value");
                }
                 this.value = value;
            }
        }
    }
}
